package com.zb.frame.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author bangZZ
 * @since 2020-06-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_menu")
@ApiModel(value="sys_menu", description="资源表")
public class Menu implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键Id")
    @TableId(value = "menu_id", type = IdType.AUTO)
    private Long menuId;

    @ApiModelProperty(value = "上级Id")
    private Long pId;

    @ApiModelProperty(value = "上级资源名称")
    @TableField(exist=false)
    private String pName;

    @ApiModelProperty(value = "资源名称")
    private String menuName;

    @ApiModelProperty(value = "资源别名")
    private String menuAlias;

    @ApiModelProperty(value = "icon图标")
    private String menuIcon;

    @ApiModelProperty(value = "类型0-目录1-菜单2-操作")
    private Integer menuType;

    @ApiModelProperty(value = "路径")
    private String menuPath;

    @ApiModelProperty(value = "授权标识")
    private String menuPerm;

    @ApiModelProperty(value = "描述")
    private String menuDesc;

    @ApiModelProperty(value = "排序")
    private Integer menuOrder;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


}
